package com.lb.jwitter;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.ForeignKey;

@Entity
@Table (name="tbl_ctdt_nhommhtuchon_monhoc")
public class Tbl_CTDT_NhomMHTuChon_MonHoc implements Serializable {
   private static final long serialVersionUID = -1989579066723007050L;

   private Long id;
   private Integer sTT;
   private Tbl_CTDT_NhomMHTuChon nhomMHTCId = null;
   private Tbl_CTDT_MonHoc monHocId = null;

   @Id
   @GeneratedValue
   public Long getId() {
	    return id;
   }
   public void setId(Long id) {
	    this.id= id;
   }

   public Integer getSTT() {
   	return sTT;
   }
   public void setSTT(Integer sTT) {
   	this.sTT= sTT;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="NhomMHTCId")
   @ForeignKey(name="FK_tbl_CTDT_NhomMHTuChon_tbl_CTDT_NhomMHTuChon_MonHoc")
   public Tbl_CTDT_NhomMHTuChon getNhomMHTCId() {
	    return nhomMHTCId;
   }
   public void setNhomMHTCId(Tbl_CTDT_NhomMHTuChon nhomMHTCId) {
	    this.nhomMHTCId=nhomMHTCId;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="MonHocId")
   @ForeignKey(name="FK_tbl_CTDT_MonHoc_tbl_CTDT_NhomMHTuChon_MonHoc")
   public Tbl_CTDT_MonHoc getMonHocId() {
	    return monHocId;
   }
   public void setMonHocId(Tbl_CTDT_MonHoc monHocId) {
	    this.monHocId=monHocId;
   }
}//endClass 

